correctly use gcc's -x option
authorJan Beulich <jbeulich@suse.com>
Tue, 4 Mar 2014 10:01:57 +0000 (11:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Mar 2014 10:01:57 +0000 (11:01 +0100)
In Linux the improper use was found to cause problems with certain
distributed build environments. Even if not directly affecting us, be
on the safe side.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Config.mk
xen/include/Makefile

index 84c558b68c8ebb588d79e263f78a3456d2b2cd73..6a935332ff0625b79434e239b04cb1420e817b43 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -101,7 +101,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
 #
 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
 cc-option = $(shell if test -z "`echo 'void*p=1;' | \
-              $(1) $(2) -S -o /dev/null -xc - 2>&1 | grep -- $(2) -`"; \
+              $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
               then echo "$(2)"; else echo "$(3)"; fi ;)
 
 # cc-option-add: Add an option to compilation flags, but only if supported.
index 9bf90c02c130039c1066fcc64960c1976dcef414..5f2bcf747eff6faff6e7059e31839ad7c1c0a95a 100644 (file)
@@ -81,7 +81,7 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
 all: headers.chk
 
 headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
-       for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
+       for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -x c $$i || exit 1; echo $$i; done >$@.new
        mv $@.new $@
 
 endif